#!"C:\xampp\perl\bin\perl.exe"
    local ($buffer, @pairs, $pair, $name, $value, %FORM);
    # Read in text
    $ENV{'REQUEST_METHOD'} =~ tr/a-z/A-Z/;
    if ($ENV{'REQUEST_METHOD'} eq "POST")
    {
        read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
    }else {
	$buffer = $ENV{'QUERY_STRING'};
    }
    # Split information into name/value pairs
    @pairs = split(/&/, $buffer);
    foreach $pair (@pairs)
    {
	($name, $value) = split(/=/, $pair);
	$value =~ tr/+/ /;
	$value =~ s/%(..)/pack("C", hex($1))/eg;
	$FORM{$name} = $value;
    }
    $query = $FORM{query};

print "Content-type:text/html\r\n\r\n";
print '<style type="text/css" title="text/css">
	<!--
		@import url("stylehasil.css");
	-->
	</style>';
print "<body>";
print "	<table cellpadding=5>";
print "	<tr>";
print "		<th width=25%>";
print "			<img src = bck.png> ";
print "		</th>";
print "		<th width=75%>";
print "			<form action='index.cgi' class='form-wrapper cf' method=POST>";
print "				<input type='text' name='query' placeholder='Cari di sini...' required>";
print "				<button type='submit'>Search</button>";
print "			</form>";
print "		</th>";
print "	</tr>";
print "	<tr>";
print "		<td colspan=2><hr><td>";
print "	</tr>";
print "	<tr>";
print "		<td colspan=2>$query<td>";
print "	</tr>";
print "	</table>";
print "</body>";
print "</html>";
